<template>
  <a-modal title="操作日志详情" style="top: 20px" :width="1000" :footer="null" v-model="visible">
    <a-card :bordered="false">
      <a-form :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="请求用户">{{ mdl.userName }}</a-form-item>
            <a-form-item label="请求方式 ">{{ mdl.requestMethod }}</a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="请求地址">{{ mdl.ip }}</a-form-item>
            <a-form-item label="请求时间">{{ mdl.createTime }}</a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="浏览器名称">{{ mdl.browserName }}</a-form-item>
            <a-form-item label="系统名称">{{ mdl.platformName }}</a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="请求消息">{{ mdl.message }}</a-form-item>
            <a-form-item label="请求状态">
              <div v-if="mdl.success===0">失败</div>
              <div v-else-if="mdl.success===1">成功</div>
            </a-form-item>
          </a-col>
          <a-col :span="24">
            <a-form-item label="请求接口">{{ mdl.path }}</a-form-item>
          </a-col>
          <a-col :span="24">
            <a-form-item label="请求方法">{{ mdl.className }}/{{ mdl.methodName }}</a-form-item>
          </a-col>
          <a-col :span="24">
            <a-form-item label="请求参数">{{ mdl.param }}</a-form-item>
          </a-col>
          <a-col :span="24">
            <a-form-item label="异常信息" v-if="mdl.success===0">{{ mdl.exceptionMessage }}</a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-card>
  </a-modal>
</template>

<script>
export default {
  name: 'OperLogModal',
  components: {},
  props: {
    operTypeMap: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      visible: false,
      mdl: {}
    }
  },
  created() {},
  methods: {
    detail(record) {
      this.mdl = Object.assign({}, record)
      this.visible = true
    }
  }
}
</script>

<style scoped>
</style>
